home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / miscpas.zip / AVERAGE3.PAS next >
Pascal/Delphi Source File  |  1992-12-29  |  433b  |  28 lines

  1. program average3;
  2.  
  3.  
  4. var
  5.     first:real;
  6.     second:real;
  7.     third:real;
  8.     average:real;
  9.     sum:real;
  10.     a:integer;
  11.  
  12. begin
  13.  
  14.     writeln('Please type in three numbers, seperated by spaces.');
  15.     write('>');
  16.     readln(first, second, third);
  17.  
  18.     sum := first + second + third;
  19.     average := sum / 3;
  20.  
  21.     writeln('The average of ' ,first,',' ,second,', and ',third);
  22.     writeln('is ',average);
  23.  
  24.     for a := 1 to 52000 do;
  25.  
  26.  
  27. end {average3}.
  28.